enum EnumPermissions {
  ARCHUS_ACCESS = "archus:access",
  ARCHUS_ADMINISTRATION_ACCESS = "archus-administration:access",
  ARCHUS_CRM_ACCESS = "archus-crm:access",
  ARCHUS_ACADEMIC_ACCESS = "archus-academic:access",
  ARCHUS_CCC_ACCESS = "archus-ccc:access",
  ARCHUS_NOTES_ACCESS = "archus-notes:access",
  BALANCE_UPDATE = "balance:update",
  INVOICE_VIEW = "invoice:view",
  INVOICE_VIEW_EXPORT = "invoice:view:export",
  INVOICE_UPDATE = "invoice:update",
  RECEIPT_VIEW = "receipt:view",
  RECEIPT_VIEW_EXPORT = "receipt:view:export",
  REFUND_VIEW = "refund:view",
  REFUND_VIEW_EXPORT = "refund:view:export",
  REFUND_UPDATE = "refund:update",
  STATEMENT_OF_ACCOUNT_VIEW = "statement-of-account:view",
  STATEMENT_OF_ACCOUNT_VIEW_EXPORT = "statement-of-account:view:export",
  PAYMENT_VIEW = "payment:view",
  PAYMENT_UPDATE = "payment:update",
  WORKSHEET_VIEW = "worksheet:view",
  WORKSHEET_VIEW_EXPORT = "worksheet:view:export",
  WORKSHEET_UPDATE = "worksheet:update",
  COURSE_VIEW = "course:view",
  COURSE_VIEW_EXPORT = "course:view:export",
  COURSE_UPDATE = "course:update",
  CLASS_VIEW = "class:view",
  CLASS_VIEW_EXPORT = "class:view:export",
  CLASS_UPDATE = "class:update",
  LESSON_VIEW = "lesson:view",
  LESSON_VIEW_EXPORT = "lesson:view:export",
  LESSON_UPDATE = "lesson:update",
  TOPIC_CREATE = "topic:create",
  HOMEWORK_VIEW = "homework:view",
  HOMEWORK_UPDATE = "homework:update",
  EXERCISE_VIEW = "exercise:view",
  EXERCISE_UPDATE = "exercise:update",
  COLLECT_VIEW = "collect:view",
  COLLECT_UPDATE = "collect:update",
  SYSTEM_USER_VIEW = "system-user:view",
  SYSTEM_USER_VIEW_EXPORT = "system-user:view:export",
  SYSTEM_USER_UPDATE = "system-user:update",
  PARENT_VIEW = "parent:view",
  PARENT_EXPORT = "parent:view:export",
  PARENT_UPDATE = "parent:update",
  STUDENT_VIEW = "student:view",
  STUDENT_EXPORT = "student:view:export",
  STUDENT_UPDATE = "student:update",
  ENROLLMENT_VIEW = "enrollment:view",
  ATTENDANCE_VIEW = "attendance:view",
  ATTENDANCE_UPDATE = "attendance:update",
  REGISTRATION_VIEW = "registration:view",
  REGISTRATION_EXPORT = "registration:view:export",
  REGISTRATION_UPDATE = "registration:update",
  ARRANGEMENT_VIEW = "arrangement:view",
  ARRANGEMENT_EXPORT = "arrangement:view:export",
  ARRANGEMENT_UPDATE = "arrangement:update",
  GROUP_ASSIGNMENT_VIEW = "group-assignment:view",
  GROUP_ASSIGNMENT_UPDATE = "group-assignment:update",
  INTEGRATION_VIEW = "integration:view",
  INTEGRATION_UPDATE = "integration:update",
  FEATURE_VIEW = "feature:view",
  FEATURE_UPDATE = "feature:update",
  TASK_VIEW = "task:view",
  TASK_UPDATE = "task:update",
  WHATSAPP_ACCOUNT_VIEW = "whatsapp-account:view",
  WHATSAPP_ACCOUNT_UPDATE = "whatsapp-account:update",
  WHATSAPP_MESSAGE_VIEW = "whatsapp-message:view",
  WHATSAPP_MESSAGE_UPDATE = "whatsapp-message:update",
  FEEDBACK_VIEW = "feedback:view",
  FEEDBACK_UPDATE = "feedback:update",
  REPORT_INVOICE_VIEW = "report-invoice:view",
  REPORT_PAYMENT_VIEW = "report-payment:view",
  REPORT_REVENUE_VIEW = "report-revenue:view",
  REPORT_ATTENDANCE_VIEW = "report-attendance:view",
  REPORT_INVOICE_VIEW_EXPORT = "report-invoice:view:export",
  REPORT_PAYMENT_VIEW_EXPORT = "report-payment:view:export",
  REPORT_REVENUE_VIEW_EXPORT = "report-revenue:view:export",
  REPORT_ATTENDANCE_VIEW_EXPORT = "report-attendance:view:export",
  COURSE_NOTIFICATION_LIST_VIEW = "course-notification-list:view",
  COURSE_NOTIFICATION_LIST_UPDATE = "course-notification-list:update",
  REMARKS_VIEW = "remarks:view",
  REMARKS_UPDATE = "remarks:update",
  ROLE_VIEW = "role:view",
  ROLE_UPDATE = "role:update",
  PERMISSION_VIEW = "permission:view",
  MATERIAL_VIEW = "material:view",
  MATERIAL_UPDATE = "material:update",
  DELIVERY_VIEW = "delivery:view",
  DELIVERY_UPDATE = "delivery:update",
  LESSON_PLAN_VIEW = "lesson-plan:view",
  LESSON_PLAN_UPDATE = "lesson-plan:update",
  PACKING_LIST_VIEW = "packing-list:view",
  PACKING_LIST_UPDATE = "packing-list:update",
  REWARD_VIEW = "reward:view",
  REWARD_UPDATE = "reward:update",
  DEPARTMENT_VIEW = "department:view",
  DEPARTMENT_UPDATE = "department:update",
  BRANCH_VIEW = "branch:view",
  BRANCH_UPDATE = "branch:update",
  VENUE_VIEW = "venue:view",
  VENUE_UPDATE = "venue:update",
  ACADEMIC_LEVEL_VIEW = "academic-level:view",
  ACADEMIC_LEVEL_UPDATE = "academic-level:update",
  SCHOOL_VIEW = "school:view",
  SCHOOL_UPDATE = "school:update",
  ACADEMIC_YEAR_VIEW = "academic-year:view",
  ACADEMIC_YEAR_UPDATE = "academic-year:update",
  TERM_BILLING_DUE_DATE_VIEW = "term-billing-due-date:view",
  TERM_BILLING_DUE_DATE_UPDATE = "term-billing-due-date:update",
  HOLIDAY_VIEW = "holiday:view",
  HOLIDAY_UPDATE = "holiday:update",
  REFERENCE_DATA_VIEW = "reference-data:view",
  REFERENCE_DATA_UPDATE = "reference-data:update",
  CAMPAIGN_VIEW = "campaign:view",
  CAMPAIGN_VIEW_EXPORT = "campaign:view:export",
  CAMPAIGN_UPDATE = "campaign:update",
  NOTIFICATION_LOG_VIEW = "notification-log:view",
  NOTIFICATION_LOG_UPDATE = "notification-log:update",
  TEMPLATE_VIEW = "template:view",
  TEMPLATE_UPDATE = "template:update",
  PROMOTION_VIEW = "promotion:view",
  PROMOTION_UPDATE = "promotion:update",
  SUITABILITY_UPDATE = "suitability:update",
  COURSE_ELIGIBILITY_VIEW = "course-eligibility:view",
  COURSE_ELIGIBILITY_UPDATE = "course-eligibility:update",
}

const myArray: string[] = [
  "archus:access",
  "archus-administration:access",
  "archus-crm:access",
  "archus-academic:access",
  "archus-ccc:access",
  "archus-notes:access",
  "invoice:view",
  "report-invoice:view",
  "invoice:view:export",
  "report-invoice:view:export",
  "invoice:update",
  "invoice:view",
  "invoice:view:export",
  "invoice:update",
  "payment:view",
  "payment:update",
  "receipt:view",
  "receipt:view:export",
  "refund:view",
  "refund:view:export",
  "refund:update",
  "statement-of-account:view",
  "statement-of-account:view:export",
  "balance:update",
  "report-finance:view",
  "report-invoice:view:export",
  "report-payment:view",
  "report-payment:view:export",
  "report-revenue:view",
  "report-revenue:view:export",
  "course:view",
  "course:view:export",
  "course:update",
  "course:view",
  "course:view:export",
  "course:update",
  "class:view",
  "class:view:export",
  "class:update",
  "lesson:view",
  "lesson:view:export",
  "lesson:update",
  "registration:view",
  "registration:view:export",
  "registration:update",
  "registration:view",
  "registration:view:export",
  "registration:update",
  "arrangement:view",
  "arrangement:view:export",
  "arrangement:update",
  "arrangement:view",
  "arrangement:view:export",
  "arrangement:update",
  "arrangement:view",
  "arrangement:view:export",
  "arrangement:update",
  "arrangement:view",
  "arrangement:view:export",
  "arrangement:update",
  "enrollment:view",
  "attendance:view",
  "registration:update",
  "report-attendance:view:export",
  "attendance:update",
  "course-notification-list:view",
  "course-notification-list:update",
  "remarks:view",
  "remarks:update",
  "student:view",
  "parent:view",
  "student:view:export",
  "student:update",
  "parent:view:export",
  "parent:update",
  "system-user:view",
  "system-user:view:export",
  "system-user:update",
  "role:view",
  "role:update",
  "permission:view",
  "task:view",
  "task:update",
  "task:view",
  "task:update",
  "task:view",
  "task:update",
  "task:view",
  "task:update",
  "department:view",
  "department:update",
  "branch:view",
  "branch:update",
  "venue:view",
  "venue:update",
  "academic-level:view",
  "academic-level:update",
  "school:view",
  "school:update",
  "academic-year:view",
  "academic-year:update",
  "view-term-billing-due-date:view",
  "view-term-billing-due-date:update",
  "holiday:view",
  "holiday:update",
  "group-assignment:view",
  "group-assignment:update",
  "reference-data:view",
  "reference-data:update",
  "whatsapp-account:view",
  "whatsapp-account:update",
  "campaign:view",
  "campaign:view:export",
  "campaign:update",
  "template:view",
  "template:update",
  "notification-log:view",
  "notification-log:update",
  "promotion:view",
  "promotion:update",
  "reward:view",
  "reward:update",
  "integrations:view",
  "integrations:update",
  "feature:view",
  "feature:update",
  "material:view",
  "material:update",
  "delivery:view",
  "delivery:update",
  "lesson-plan:view",
  "lesson-plan:update",
  "packing-list:view",
  "packing-list:update",
  "worksheet:view",
  "worksheet:update",
];

function checkEnumValuesInArray(
  enumObj: any,
  arr: string[]
): { inArray: string[]; notInArray: string[] } {
  const inArray: string[] = [];
  const notInArray: string[] = [];

  // 获取枚举的所有值
  const enumValues = Object.values(enumObj);

  // 遍历枚举值，检查是否存在于数组中
  enumValues.forEach((value) => {
    if (arr.includes(value)) {
      inArray.push(value);
    } else {
      notInArray.push(value);
    }
  });

  return { inArray, notInArray };
}

const result = checkEnumValuesInArray(EnumPermissions, myArray);
console.log("在数组中的枚举值：", result.inArray);
console.log("不在数组中的枚举值：", result.notInArray);